\(\int \frac {\cosh ^2(a+b x^n)}{x} \, dx\) [38]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 14, antiderivative size = 43 \[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\frac {\cosh (2 a) \text {Chi}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2}+\frac {\sinh (2 a) \text {Shi}\left (2 b x^n\right )}{2 n} \]

[Out]

1/2*Chi(2*b*x^n)*cosh(2*a)/n+1/2*ln(x)+1/2*Shi(2*b*x^n)*sinh(2*a)/n

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {5471, 5427, 5425, 5424} \[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\frac {\cosh (2 a) \text {Chi}\left (2 b x^n\right )}{2 n}+\frac {\sinh (2 a) \text {Shi}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2} \]

[In]

Int[Cosh[a + b*x^n]^2/x,x]

[Out]

(Cosh[2*a]*CoshIntegral[2*b*x^n])/(2*n) + Log[x]/2 + (Sinh[2*a]*SinhIntegral[2*b*x^n])/(2*n)

Rule 5424

Int[Sinh[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinhIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 5425

Int[Cosh[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CoshIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 5427

Int[Cosh[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cosh[c], Int[Cosh[d*x^n]/x, x], x] + Dist[Sinh[c], In
t[Sinh[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 5471

Int[((a_.) + Cosh[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(
e*x)^m, (a + b*Cosh[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{2 x}+\frac {\cosh \left (2 a+2 b x^n\right )}{2 x}\right ) \, dx \\ & = \frac {\log (x)}{2}+\frac {1}{2} \int \frac {\cosh \left (2 a+2 b x^n\right )}{x} \, dx \\ & = \frac {\log (x)}{2}+\frac {1}{2} \cosh (2 a) \int \frac {\cosh \left (2 b x^n\right )}{x} \, dx+\frac {1}{2} \sinh (2 a) \int \frac {\sinh \left (2 b x^n\right )}{x} \, dx \\ & = \frac {\cosh (2 a) \text {Chi}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2}+\frac {\sinh (2 a) \text {Shi}\left (2 b x^n\right )}{2 n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.84 \[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\frac {\cosh (2 a) \text {Chi}\left (2 b x^n\right )+n \log (x)+\sinh (2 a) \text {Shi}\left (2 b x^n\right )}{2 n} \]

[In]

Integrate[Cosh[a + b*x^n]^2/x,x]

[Out]

(Cosh[2*a]*CoshIntegral[2*b*x^n] + n*Log[x] + Sinh[2*a]*SinhIntegral[2*b*x^n])/(2*n)

Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.93

method result size
risch \(\frac {\ln \left (x \right )}{2}-\frac {{\mathrm e}^{-2 a} \operatorname {Ei}_{1}\left (2 b \,x^{n}\right )}{4 n}-\frac {{\mathrm e}^{2 a} \operatorname {Ei}_{1}\left (-2 b \,x^{n}\right )}{4 n}\) \(40\)

[In]

int(cosh(a+b*x^n)^2/x,x,method=_RETURNVERBOSE)

[Out]

1/2*ln(x)-1/4/n*exp(-2*a)*Ei(1,2*b*x^n)-1/4/n*exp(2*a)*Ei(1,-2*b*x^n)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.60 \[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\frac {{\left (\cosh \left (2 \, a\right ) + \sinh \left (2 \, a\right )\right )} {\rm Ei}\left (2 \, b \cosh \left (n \log \left (x\right )\right ) + 2 \, b \sinh \left (n \log \left (x\right )\right )\right ) + {\left (\cosh \left (2 \, a\right ) - \sinh \left (2 \, a\right )\right )} {\rm Ei}\left (-2 \, b \cosh \left (n \log \left (x\right )\right ) - 2 \, b \sinh \left (n \log \left (x\right )\right )\right ) + 2 \, n \log \left (x\right )}{4 \, n} \]

[In]

integrate(cosh(a+b*x^n)^2/x,x, algorithm="fricas")

[Out]

1/4*((cosh(2*a) + sinh(2*a))*Ei(2*b*cosh(n*log(x)) + 2*b*sinh(n*log(x))) + (cosh(2*a) - sinh(2*a))*Ei(-2*b*cos
h(n*log(x)) - 2*b*sinh(n*log(x))) + 2*n*log(x))/n

Sympy [F]

\[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\int \frac {\cosh ^{2}{\left (a + b x^{n} \right )}}{x}\, dx \]

[In]

integrate(cosh(a+b*x**n)**2/x,x)

[Out]

Integral(cosh(a + b*x**n)**2/x, x)

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.86 \[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\frac {{\rm Ei}\left (2 \, b x^{n}\right ) e^{\left (2 \, a\right )}}{4 \, n} + \frac {{\rm Ei}\left (-2 \, b x^{n}\right ) e^{\left (-2 \, a\right )}}{4 \, n} + \frac {1}{2} \, \log \left (x\right ) \]

[In]

integrate(cosh(a+b*x^n)^2/x,x, algorithm="maxima")

[Out]

1/4*Ei(2*b*x^n)*e^(2*a)/n + 1/4*Ei(-2*b*x^n)*e^(-2*a)/n + 1/2*log(x)

Giac [F]

\[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\int { \frac {\cosh \left (b x^{n} + a\right )^{2}}{x} \,d x } \]

[In]

integrate(cosh(a+b*x^n)^2/x,x, algorithm="giac")

[Out]

integrate(cosh(b*x^n + a)^2/x, x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\cosh ^2\left (a+b x^n\right )}{x} \, dx=\int \frac {{\mathrm {cosh}\left (a+b\,x^n\right )}^2}{x} \,d x \]

[In]

int(cosh(a + b*x^n)^2/x,x)

[Out]

int(cosh(a + b*x^n)^2/x, x)